# Maintainer: Ivan Semkin (ivan at semkin dot ru)

pkgname=qt5-pim-git
_pkgname=qtpim
pkgver=v5.0.0.beta1.r218.g3f567865
pkgrel=1
pkgdesc='Qt Personal Information Management'
url='http://code.qt.io/cgit/qt/qtpim.git'
arch=(x86_64 i686 armv7h aarch64)
license=()
conflicts=(qt5-pim)
provides=(qt5-pim)
depends=(qt5-declarative)
makedepends=(git)
source=('git+http://code.qt.io/cgit/qt/qtpim.git')
sha256sums=('SKIP')

pkgver() {
  cd ${_pkgname}
  echo "$(git describe --tags | sed 's/-/./; s/-/.r/; s/-/./g')"
}

build() {
  cd ${_pkgname}
  qmake-qt5
  make
}

check() {
  cd ${_pkgname}
  make check TESTARGS="-silent"
}

package() {
  cd ${_pkgname}
  make INSTALL_ROOT="${pkgdir}/" install
  
  # Drop QMAKE_PRL_BUILD_DIR because it references the build dir
  find "$pkgdir/usr/lib" -type f -name '*.prl' \
    -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
}
# vim:set ts=2 sw=2 et:
